package org.lifeyears.web.action;

import org.lifeyears.model.Project;
import org.lifeyears.services.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;

public class ProjectAction
	extends AbstractLifeyearsAction
{

    @Autowired
    private ProjectService projectService;


    @Override
    public String execute()
        throws Exception
    {
        return SUCCESS;
    }

    public Project getProjectByName(final String name)
    {
		return projectService.getProjectByName(name);
    }

    public Project getProjectById(final Long id)
    {
    	return projectService.get(id);
    }
}
